/*
 * TOP SECRET Copyright 2006-2015 Transsion.com All right reserved. This software is the confidential and proprietary
 * information of Transsion.com ("Confidential Information"). You shall not disclose such Confidential Information and
 * shall use it only in accordance with the terms of the license agreement you entered into with Transsion.com.
 */
package com.palmplaystore.bigdata.storm.appupdate.bean;

import java.io.Serializable;
import java.sql.Timestamp;

import com.alibaba.fastjson.JSONObject;

/**
 * ClassName:UpdateObject <br/>
 * Date: 2018年4月24日 下午5:55:36 <br/>
 * 
 * @author fenglibin
 * @version
 * @see
 */
public class AppObject implements Serializable {

    private static final long serialVersionUID = 1286078679331130066L;
    private String            brand;
    private String            channel;
    private String            curClientVersionCode;
    private String            imei;
    private String            imsi;
    private String            lan;
    private String            netType;
    private String            systemVersionCode;
    private String            ua;
    private String            packageName;
    int                       version;
    private String            countryCode;
    private String            operator;
    private Timestamp         createTime;
    private String            ipAddress;
    private String            md5;
    private String            isUpdate;
    /** 该字段主要用于生成rowkey的时候使用 **/
    private int               keyIndex;

    public String getBrand() {
        return brand == null ? "" : brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getChannel() {
        return channel == null ? "" : channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }

    public String getCurClientVersionCode() {
        return curClientVersionCode == null ? "" : curClientVersionCode;
    }

    public void setCurClientVersionCode(String curClientVersionCode) {
        this.curClientVersionCode = curClientVersionCode;
    }

    public String getImei() {
        return imei == null ? "" : imei;
    }

    public void setImei(String imei) {
        this.imei = imei;
    }

    public String getImsi() {
        return imsi == null ? "" : imsi;
    }

    public void setImsi(String imsi) {
        this.imsi = imsi;
    }

    public String getLan() {
        return lan == null ? "" : lan;
    }

    public void setLan(String lan) {
        this.lan = lan;
    }

    public String getNetType() {
        return netType == null ? "" : netType;
    }

    public void setNetType(String netType) {
        this.netType = netType;
    }

    public String getSystemVersionCode() {
        return systemVersionCode == null ? "" : systemVersionCode;
    }

    public void setSystemVersionCode(String systemVersionCode) {
        this.systemVersionCode = systemVersionCode;
    }

    public String getUa() {
        return ua == null ? "" : ua;
    }

    public void setUa(String ua) {
        this.ua = ua;
    }

    public String getPackageName() {
        return packageName;
    }

    public void setPackageName(String packageName) {
        this.packageName = packageName;
    }

    public int getVersion() {
        return version;
    }

    public void setVersion(int version) {
        this.version = version;
    }

    public String getCountryCode() {
        return countryCode == null ? "" : countryCode;
    }

    public void setCountryCode(String countryCode) {
        this.countryCode = countryCode;
    }

    public String getOperator() {
        return operator == null ? "" : operator;
    }

    public void setOperator(String operator) {
        this.operator = operator;
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    public String getIpAddress() {
        return ipAddress;
    }

    public void setIpAddress(String ipAddress) {
        this.ipAddress = ipAddress;
    }

    public String getMd5() {
    	return md5 == null ? "" : md5;
    }

    public void setMd5(String md5) {
        this.md5 = md5;
    }
    
    public int getKeyIndex() {
        return keyIndex;
    }

    
    public void setKeyIndex(int keyIndex) {
        this.keyIndex = keyIndex;
    }

    public String getIsUpdate() {
		return isUpdate;
	}

	public void setIsUpdate(String isUpdate) {
		this.isUpdate = isUpdate;
	}

	public AppObject clone() {
        AppObject newObj = new AppObject();
        newObj.setBrand(brand);
        newObj.setChannel(channel);
        newObj.setCountryCode(countryCode);
        newObj.setCreateTime(createTime);
        newObj.setCurClientVersionCode(curClientVersionCode);
        newObj.setImei(imei);
        newObj.setImsi(imsi);
        newObj.setIpAddress(ipAddress);
        newObj.setLan(lan);
        newObj.setNetType(netType);
        newObj.setOperator(operator);
        newObj.setPackageName(packageName);
        newObj.setCurClientVersionCode(systemVersionCode);
        newObj.setUa(ua);
        newObj.setVersion(version);
        newObj.setMd5(md5);
        newObj.setKeyIndex(keyIndex);
        newObj.setIsUpdate(isUpdate);
        return newObj;
    }

    public String toString() {
        return JSONObject.toJSONString(this);
    }

}
